package net.hn.hnms.biz.plan.enums;

import lombok.Getter;

@Getter
public enum ShiftTypeEnum {
    // 早班 0点班
    // 中班 8点班
    // 晚班 4点班
    SHIFT_0(0,"早班"),
    SHIFT_8(8,"中班"),
    SHIFT_4(4,"晚班");

    private int code;
    private String name;

    ShiftTypeEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static ShiftTypeEnum getShiftTypeEnum(int code){
        for (ShiftTypeEnum shiftTypeEnum : ShiftTypeEnum.values()) {
            if(shiftTypeEnum.getCode() == code){
                return shiftTypeEnum;
            }
        }
        return null;
    }
}
